import request from '@/utils/request'

// 获取疾病记录列表
export const getDiseaseList = (params) => {
  return request({
    url: '/disease/list',
    method: 'get',
    params
  })
}

// 获取疾病详情
export const getDiseaseDetail = (id) => {
  return request({
    url: `/disease/${id}`,
    method: 'get'
  })
}

// 新增疾病记录
export const createDisease = (data) => {
  return request({
    url: '/disease',
    method: 'post',
    data
  })
}

// 更新疾病记录
export const updateDisease = (id, data) => {
  return request({
    url: `/disease/${id}`,
    method: 'put',
    data
  })
}

// 删除疾病记录
export const deleteDisease = (id) => {
  return request({
    url: `/disease/${id}`,
    method: 'delete'
  })
}

// 获取疾病统计
export const getDiseaseStats = (params) => {
  return request({
    url: '/disease/stats',
    method: 'get',
    params
  })
}

